#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>
int numDifferentIntegers(char* word)
{
    int num = 0;
    int i = 0;
    int len0 = 0;
    char* tmp = word;
    while (*tmp)
    {
        len0++;
        tmp++;
    }
    int arr[1000] = { 0 };
    for (i = 0; i < len0; i++)
    {
        if (*(word + i) >= 'a' && *(word + i) <= 'z')
        {
            *(word + i) = ' ';
        }
        else
        {
            int tmp = i;
            int len = 0;
            while (*(word + i) >= '0' && *(word + i) <= '9')
            {
                i++;
                len++;
            }
            while (len)
            {
                arr[num] += pow(10, len - 1) * (*(word + tmp) - '0');
                tmp++;
                len--;
            }
            num++;
            i--;
        }
    }
    int j = 0;
    int count = num;
    int c = 0;
    for (i = 0; i < num-1; i++)
    {
        for (j = i+1; j < num; j++)
        {
            if (arr[i] ==arr[j])
            {
                count--;
                break;
            }
        }
    }
    return count;
}

int main()
{
    char word1[1000] = "a123bc34d8ef34";
    printf("%d", numDifferentIntegers(word1));
    return 0;
}